
set(CMAKE_CXX_STANDARD 20)


set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE ON)
set(CMAKE_C_OUTPUT_EXTENSION_REPLACE ON)


set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} ${GNUCXX_LIB_PATH})


message(STATUS "CMAKE_INSTALL_RPATH : ${CMAKE_INSTALL_RPATH}")


# settings per configuration
set(COMPILER_CXX_FLAGS          "${COREDEV_BUILD_MODEL_FLAG} -pedantic -Wall -Wno-long-long -Wno-variadic-macros")
set(COMPILER_CXX_FLAGS_DEBUG    "-g -O0 -fprofile-arcs -ftest-coverage")
set(COMPILER_CXX_FLAGS_RELEASE  "-O2 -DNDEBUG")

set(CMAKE_CXX_FLAGS          "${COMPILER_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS            "${COMPILER_CXX_FLAGS_RELEASE}")

set(CMAKE_CXX_FLAGS_DEBUG    "${COMPILER_CXX_FLAGS_DEBUG}")
set(CMAKE_C_FLAGS_DEBUG      "${COMPILER_CXX_FLAGS_DEBUG}")

message(STATUS "CMAKE_C_FLAGS_DEBUG : ${CMAKE_C_FLAGS_DEBUG}")

set(CMAKE_CXX_FLAGS_RELEASE  "${COMPILER_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE    "${COMPILER_CXX_FLAGS_RELEASE}")

